<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
	#div1 { width: 200px; height: 200px; position: absolute; background: red;}	
</style>
<script>
window.onload = function()
{
		var oBtn = document.getElementById('btn1');
		var oDiv1 = document.getElementById('div1');
		
		oBtn.onclick = function(){
					setInterval(function(){ oDiv1.style.left = oDiv1.offsetLeft + 10 + 'px';},50);
		}
}
</script>
</head>

<body>
<input type="button" id="btn1" value="运动">
<div id="div1"></div>

</body>
</html>
